package com.qd.panda.system;

import com.cdqidi.dto.DelDTO;
import com.qd.common.sys.domain.entity.system.SystemSetDTO;
import com.qd.system.service.system.SystemSetService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.constraints.NotBlank;

/**
 * APP_系统设置
 *
 * @author sjk
 */
@RequiredArgsConstructor
@Validated
@RestController
@RequestMapping("/app/systemSet")
@Slf4j
public class AppSystemSetController {
    private final SystemSetService systemSetService;

    /**
     * 获取系统设置
     *
     * @param id 主键
     * @return 记录
     */
    @GetMapping(value = "/getById")
    public SystemSetDTO getById(@Validated @NotBlank(message = DelDTO.ID_NULL_MSG) String id) {
        return systemSetService.getByIdDto(id);
    }
}